#include<iostream>
#include<string>
#include"Any.hpp"

struct Test{
    Test(){std::cout<<"Test()"<<std::endl;}
    Test(const Test&){std::cout<<"Test(const Test&)"<<std::endl;}
    Test& operator=(const Test&){std::cout<<"Test& operator=(const Test&)"<<std::endl;return *this;}
    ~Test(){std::cout<<"~Test()"<<std::endl;}
};


int main()
{
    Any a;
    a = 100;
    int p = a.GetData<int>();
    std::cout << p << std::endl;
    // a = "hello world";
    a = std::string("hello world");
    std::string str = a.GetData<std::string>();
    std::cout << str << std::endl;
    Test t;
    a = t;
    return 0;
}